package demo14;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;

/**
 * @author Huangjin
 * @version 1.0
 * describe:
 * @date 2023/3/7 17:44
 */
public class CopyDemo {
    public static void main(String[] args) throws IOException {
        FileInputStream fis = new FileInputStream("");
        FileOutputStream fos = new FileOutputStream("");
        long start = System.currentTimeMillis();
        int d;
        while ((d = fis.read())!=-1){
            fos.write(d);
        }
        long end = System.currentTimeMillis();
        System.out.println("耗时："+(end-start)+"ms");
        System.out.println("复制完毕");
        fis.close();
        fos.close();
    }
}
